home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ham Radio 2000 #2
/
Ham Radio 2000 - Volume 2.iso
/
HAMV2
/
MISC
/
WINLINK
/
WLDLL._
/
WLDLL.
Wrap
Text File
|
1995-11-15
|
8KB
|
251 lines
// Project..........WinLink
// File Name........WLDLL.H
// File Version.....12/24/92
//
// Copyright (c) 1992 - All Rights Reserved
// Victor D. Poor, W5SMM
// 8819 Welles Edge
// San Antonio, Texas, USA 78240
// Modification Log: Hans A. Kessler - N8PGR
// 1.2 Added function WLDLLversion()
// 1.3A - Added WLM_TRFCSTATUS and respones
// 1.3B - Added WLM_QTC
#ifndef WLDLL_H
#define WLDLL_H
#define COMPLETE 0
#define WILD 1
#include "..\win.h"
// Startup Function...
extern BOOL FAR PASCAL RegisterWinlinkApplication (HWND hwnd,
const char *szAppName, const char *szInstName);
extern BOOL FAR PASCAL UnregisterWinlinkApplication (HWND hwnd);
extern void FAR PASCAL _export WLDLLversion (char FAR *cur_vers);
// Intertask command messages...
#define WLM_SHOWMAX WM_USER + 1
#define WLM_SHOWMIN WM_USER + 2
#define WLM_SHOWNORMAL WM_USER + 3
#define WLM_LINKSTATUS WM_USER + 4
#define WLM_BBSSTATUS WM_USER + 5
#define WLM_SETBBS WM_USER + 6
#define WLM_SETKSR WM_USER + 7
#define WLM_SETCALL WM_USER + 8
#define WLM_CALL WM_USER + 9
#define WLM_AUTOFWD WM_USER + 10
#define WLM_SEND WM_USER + 11
#define WLM_ENDLINK WM_USER + 12
#define WLM_RESET WM_USER + 13
#define WLM_UPDATE WM_USER + 14
#define WLM_INTERCEPT WM_USER + 15
#define WLM_WPAGES WM_USER + 16
#define WLM_TRFCSTAT WM_USER + 17
#define WLM_MONITOR WM_USER + 18
#define WLM_QTC WM_USER + 19
#define WLM_LONG_ROB WM_USER + 20 // LongPath (Pactor) or Robust (Clover)
// Intertask status responses...
#define WLR_FAILURE 0
#define WLR_SUCCESS 1
#define WLR_NO 0
#define WLR_YES 1
#define WLR_STANDBY 2
#define WLR_CALLING 3
#define WLR_LINKED 4
#define WLR_KSR 2
#define WLR_CLOSED 3
#define WLR_OPEN 4
#define WLR_TRAFFIC 5
#define WLR_QUIET 6
// BBS numbers...
#define BBS00 0
#define BBS01 1
#define BBS02 2
#define BBS03 3
#define BBS04 4
#define BBS05 5
#define BBS06 6
#define BBS07 7
#define BBS08 8
#define BBS09 9
#define BBS10 10
#define BBS11 11
#define BBS12 12
#define BBS13 13
#define BBS14 14
#define BBS15 15
#define BBS16 16
#define BBS17 17
#define BBS18 18
#define BBS19 19
#define BBS20 20
#define BBS21 21
#define BBS22 22
#define BBS23 21
#define BBS24 24
#define BBS25 25
#define BBS26 26
#define BBS27 27
#define BBS28 28
#define BBS29 29
#define BBS30 30
#define BBS31 31
// Intertask Communications Functions...
extern HWND FAR PASCAL GetWinlinkApplicationHandle (const char *szAppName, const char *szInstName);
extern WORD FAR PASCAL SendWinlinkMessage (HWND hwnd, WORD wMsg, WORD wParam);
// USER FILE DEFINITIONS
// User status flags...
#define US_MBO 0x00000001L
#define US_EXPERT 0x00000002L // US_EXPERT is not currently used by Winlink
#define US_NOPURGE 0x00000004L
#define US_LOCKOUT 0x00000008L
#define US_HOLDMSGS 0x00000010L
// User data structure...
typedef struct
{
DWORD dwAccess; // User privilage mask
char szCall [7]; // User call letters
char szSelcal [5]; // User selcal
char szPrefix [6]; // User prefix
char szSuffix [6]; // User suffix
long lLogin; // Time of last login
long lLastmsg; // Last message number listed
long lLastbul; // Last bulletin number listed
} USER;
// User data functions...
extern BOOL FAR PASCAL IsValidCall (char *szCall);
extern int FAR PASCAL GetIndexedUser (HWND, int, USER FAR *);
extern int FAR PASCAL GetUser (HWND, char FAR *, USER FAR *);
extern int FAR PASCAL UpdateUser (HWND, USER FAR *);
extern int FAR PASCAL DeleteUser (HWND, char FAR *);
extern int FAR PASCAL PurgeUserFile (HWND);
// MESSAGE FILE DEFINITIONS
// Title line for mcb string
#define SYSMCBTITLE "NUMBER TS SIZE TO FROM AT FILED(Z) SUBJECT"
// Message Status Word Flags
// Message Source
#define MB_SYSOP 0x00000001L
#define MB_PACKET 0x00000002L
#define MB_AMTOR 0x00000004L
#define MB_PACTOR 0x00000008L
#define MB_CLOVER 0x00000010L
#define MB_IMPORT 0x00000020L
// Message Status
#define MB_STATIC 0x00000100L
#define MB_PENDING 0x00000200L
#define MB_FORWARDED 0x00000400L
#define MB_REJECTED 0x00001000L
#define MB_ONHOLD 0x00002000L
#define MB_CANCELLED 0x00004000L
#define MB_BUSY 0x00008000L
// Type of message
#define MB_BULLETIN 0x00010000L
#define MB_PRIVATE 0x00020000L
#define MB_NTS 0x00040000L
#define MB_HELP 0x00080000L
// Log tags
#define MB_WPUPDATE 0x10000000L
#define MB_LOGGEDIN 0x20000000L
#define MB_LOGGEDOUT 0x40000000L
// Structure used by parser...
typedef struct
{
char *szText; // Original string containing the command
int iCount; // Number of tokens found (max of 8)
int fPlusQuery; // 1 if +? in text, else 0
char szTok [12] [42]; // Array of tokens taken from orig
} TOKS;
// Message control block (MCB) structure...
typedef struct
{
DWORD dwMSW; // Message status word
DWORD dwForward; // Multiaddress bit map
int iLocation; // Location of mcb in the mcb file
long lMsgNumber; // Message number
long lOriginalMsgNumber; // Originating station message number
long lSize; // Message length
long lArrivalTime; // Time/date message entered this system
long lOriginationTime; // Time/date message was originated
long lForwardingTime; // Time/date message was forwarded
char szMID [16]; // Message (Bulletin) identification
char szTo [7]; // Call/Designator of destination station(s)
char szAt [40]; // Routing to destination
char szFrom [7]; // Call of originating station
char szOriginatingBBS [7]; // Call of originating bbs
char szForwardingBBS [7]; // Call of bbs forwarding message to this station
char szMsgFile [21]; // Name of file containing message
char szTitle [64]; // Title (subject) of the message
} MCB, *MCBPTR;
// GetMCB () search requests
#define FORWARD 1
#define REVERSE 2
#define MSGNUMBER 3
// GetMCB () field flags
#define FF_TO 1
#define FF_AT 2
#define FF_FROM 4
// Message search mask structure...
typedef struct
{
int iLastIndex;
WORD wRequest;
DWORD dwMSW;
WORD wFieldFlags;
char szTo [7];
char szAt [40];
char szFrom [7];
long lMsgNumberLimit;
} SEARCHMASK;
// Message data functions...
extern int FAR PASCAL GetMCB (HWND hwnd, SEARCHMASK FAR *sm, MCB FAR *pMcb);
extern BOOL FAR PASCAL MidMatch (HWND hwnd, char *szMID);
extern void FAR PASCAL Mcb2Str (MCB FAR *pMcb, char FAR *szMcb);
extern int FAR PASCAL UpdateMCB (HWND hwnd, MCB FAR *pMcb);
extern long FAR PASCAL GetNewMessageNumber (HWND hwnd);
extern long FAR PASCAL GetLastMessageNumber (HWND hwnd);
extern int FAR PASCAL AddNewMCB (HWND hwnd, MCB FAR *);
extern void FAR PASCAL Parse (const char *szText, const char *szDelimit, TOKS *t);
extern void FAR PASCAL SetBusy (HWND hwnd, MCB FAR *);
extern void FAR PASCAL ClearBusy (HWND hwnd, MCB FAR *);
// Note: CSTR is defined elsewhere as "const char*"
extern CSTR FAR PASCAL Station ();
extern CSTR FAR PASCAL Selcal ();
extern CSTR FAR PASCAL Prefix ();
extern CSTR FAR PASCAL Postfix ();
extern CSTR FAR PASCAL QTH ();
extern CSTR FAR PASCAL DataPath (CSTR szName);
extern CSTR FAR PASCAL MessagePath (CSTR szName);
extern CSTR FAR PASCAL BinaryPath (CSTR szName);
extern CSTR FAR PASCAL LogPath (CSTR szName);
extern CSTR FAR PASCAL Route ();
extern BOOL FAR PASCAL IsOwnHeader ();
#endif